﻿using System;
using System.IO;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace CommunitySystem.PageView
{
    public class DownLoadEmpInExcelTemplate
    {
        public bool IsWord = false;
        public void Load(Stream s)
        {

            Byte[] fileContent = Resource1.biaozhunban;
            s.Write(fileContent, 0, fileContent.Length);
            s.Close();

            SilverlightMessageBoxLibrary.Message.InfoMessage("下载完毕!");
        }
    }

    public class DownLoadEmpInExcelZLZWTemplate
    {
        public bool IsWord = false;
        public void Load(Stream s)
        {

            Byte[] fileContent = Resource1.招录职位导入模板;
            s.Write(fileContent, 0, fileContent.Length);
            s.Close();

            SilverlightMessageBoxLibrary.Message.InfoMessage("下载完毕!");
        }
    }

    public class DownLoadDiaoDongWordTemplate
    {
        public bool IsWord = true;
        public void Load(Stream s)
        {

            Byte[] fileContent = Resource1.公务员调动表;
            s.Write(fileContent, 0, fileContent.Length);
            s.Close();

            SilverlightMessageBoxLibrary.Message.InfoMessage("下载完毕!");
        }
    }

    public class DownLoadCanGongWordTemplate
    {
        public bool IsWord = true;
        public void Load(Stream s)
        {

            Byte[] fileContent = Resource1.参公人员调动表;
            s.Write(fileContent, 0, fileContent.Length);
            s.Close();

            SilverlightMessageBoxLibrary.Message.InfoMessage("下载完毕!");
        }
    }

    //public class DownLoadDiaoDongWordTemplate
    //{
    //    private SaveFileDialog _saveFileDialog;
    //    public SaveFileDialog SaveFileDialog
    //    {
    //        get { return _saveFileDialog; }
    //        set { _saveFileDialog = value; }
    //    }

    //    public void Load(Stream s)
    //    {
    //        if (SaveFileDialog == null) SaveFileDialog = new SaveFileDialog();
    //        string strPath = Environment.CurrentDirectory;
    //        //显示对话框
    //        bool? b = SaveFileDialog.ShowDialog();

    //        if (b == true)//点击保存
    //        {
    //            SaveFile();
    //        }

    //    }

    //    private void SaveFile()
    //    {

    //        using (Stream stream = SaveFileDialog.OpenFile())
    //        {
    //            //获取资源文件
    //            Byte[] fileContent = Resource1._2013年系统开发计划框架;
    //            stream.Write(fileContent, 0, fileContent.Length);
    //            stream.Close();
    //            MessageBox.Show("操作手册下载成功!");
    //            //if (MessageBox.Show("操作手册下载成功!是否打开？", "系统提示", MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.Yes)
    //            //{
    //            //    //System.Diagnostics.Process.Start(SaveFileDialog.FileName);
    //            //}

    //        }

    //    }

    //}
}
